<template>
  <el-dialog title="批量积分操作" :before-close="handleClose" :close-on-click-modal="false" :visible.sync="visible" class="cu-dialog cu-dialog_center"
    lock-scroll width="900px">
    <el-row :gutter="15" class="">
      <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :rules="rules">
        <el-col :span="24">
          <el-form-item label="校区" >
            <div class='schools-list'>
              <span v-for='(item, index) in handleSelection' :key='index'>
                {{item.name}}
                <i class="el-icon-close" @click='deleteSelection(index)'></i>
              </span>
            </div>
           <span ></span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="积分规则" prop="ruleId">
            <el-select v-model="dataForm.ruleId" placeholder="请选择" filterable clearable required
              :style='{"width":"100%"}' @change="hanldRuleChange($event)">
              <el-option v-for="(item, index) in ruleOptions" :key="index" :label="item.fullName+'('+item.points+')'"
                :value="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="积分值" prop="points">
            <el-input v-model="dataForm.points" :style='{"width":"100%"}' readonly></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="备注" prop="memo">
            <el-input v-model="dataForm.memo" placeholder="请输入" show-word-limit :style='{"width":"100%"}'
              type='textarea' :autosize='{"minRows":4,"maxRows":4}'>
            </el-input>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="onClose() ">取 消</el-button>
      <el-button type="primary" @click="dataFormSubmit()" :loading="loading">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.el-time-spinner__wrapper {
  width: 100% !important;
}
@import url(index.scss);
</style>
